package com.faneui.transfer.common.code;

public enum AccountTypeEnum {
	
	weixing(1, "微信"), zhifubao(2, "支付宝");

	private final int code;
	private final String desc;

	private AccountTypeEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public static AccountTypeEnum getEnumByCode(int code) {
		if (code == 1) {
			return weixing;
		} else if (code == 2) {
			return zhifubao;
		} else {
			return null;
		}
	}

}
